import { Controller, Get, Render } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) { }
  @Get('')
  @Render('index') // 对应 views/index.ejs
  root() {
    return { message: '服务已经成功启动✌️!' };
  }

  @Get('time')
  getTime(): string {
    return this.appService.getTime();
  }
}
